﻿import idv.ben.gc4flash.chart.*;
import idv.ben.gc4flash.dataLine.*;
import idv.ben.gc4flash.encode.*;
import idv.ben.gc4flash.fill.*;
import idv.ben.gc4flash.style.*;
import idv.ben.gc4flash.util.*;
/**
* GridLinesStyle，用來設定 {@link idv.ben.gc4flash.chart.LineChart} 與 {@link idv.ben.gc4flash.chart.ScatterPlotsChart} 的格子樣式。<br>
*/
class idv.ben.gc4flash.style.GridLinesStyle {
	private var x_size:Number;
	private var y_size:Number;
	private var lineLen:Number;
	private var blankLen:Number;
	/**
	* 建構子
	* @param x_size X軸，每隔多少距離劃一條線，0 ~ 100
	* @param y_size Y軸，每隔多少距離劃一條線，0 ~ 100
	* @param lineLen optional，小線條長度
	* @param blankLen optional，小線條的間距
	*/
	function GridLinesStyle(x_size:Number, y_size:Number, lineLen:Number, blankLen:Number) {
		this.x_size = x_size;
		this.y_size = y_size;
		this.lineLen = lineLen;
		this.blankLen = blankLen;
	}
	/**
	* 取得 {@link idv.ben.gc4flash.dataLine.GridLinesStyle} 所組成的 URL 參數字串<br>
	* <br>
	* <img src="http://chart.apis.google.com/chart?cht=lc&chd=s:cEAELFJHHHKUju9uuXUc&chco=76A4FB&chls=2.0,0.0,0.0&chxt=x,y&chxl=0:|0|1|2|3|4|5|1:|0|50|100&chs=200x125&chg=20,50"><br>
	* chg=20,50<br>
	* <br>
	* <img src="http://chart.apis.google.com/chart?cht=lc&chd=s:cEAELFJHHHKUju9uuXUc&chco=76A4FB&chls=2.0,0.0,0.0&chxt=x,y&chxl=0:|0|1|2|3|4|5|1:|0|50|100&chs=200x125&chg=20,50,1,5"><br>
	* chg=20,50,1,5<br>
	* <br>
	* <img src="http://chart.apis.google.com/chart?cht=lc&chd=s:cEAELFJHHHKUju9uuXUc&chco=76A4FB&chls=2.0,0.0,0.0&chs=200x125&chg=20,50,1,0&chxt=x,y&chxl=0:|0|1|2|3|4|5|1:|0|50|100"><br>
	* chg=20,50,1,0<br>
	* <br>
	* @return URL 參數字串
	*/
	public function toChartData():String {
		if(x_size!=null && y_size!=null){
			if(lineLen!=null && blankLen!=null){
				return x_size + "," + y_size + "," + lineLen + "," + blankLen;
			}else{
				return x_size + "," + y_size;
			}
		}else{
			return "";
		}
	}
}